Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UIDATIMP-1540: Fetch Job summary data with for a particular tenant id #1478

Merged
merged 7 commits into from
Oct 12, 2023

Conversation

mariia-aloshyna
Copy link
Contributor

Purpose

To provide marc record and instance on the member tenant log page with jsons when marc-to-marc matching and marc-bib update has been performed on the central tenant by data import initiated on a member tenant.

Approach

  • Use custom useTenantKy hook to extend headers with tenantId

Refs

https://issues.folio.org/browse/UIDATIMP-1540

Screenshots

@github-actions
Copy link

github-actions bot commented Oct 11, 2023

Jest Unit Test Statistics

       1 files  ±0     217 suites  +1   12m 34s ⏱️ - 5m 36s
1 144 tests +2  1 141 ✔️ +5  3 💤 ±0  0  - 3 
1 155 runs  +2  1 152 ✔️ +5  3 💤 ±0  0  - 3 

Results for commit fbaeacd. ± Comparison against base commit d5673b7.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Oct 11, 2023

BigTest Unit Test Statistics

0 tests  ±0   0 ✔️ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
0 files   ±0   0 ±0 

Results for commit fbaeacd. ± Comparison against base commit d5673b7.

♻️ This comment has been updated with latest results.

src/routes/ViewJobLog.js Outdated Show resolved Hide resolved
src/hooks/useSRSRecordQuery.js Outdated Show resolved Hide resolved
Copy link
Member

@zburke zburke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but what do you think about just implementing useTenantKy in useOkapiKy directly in stripes-core? useTenantKy feels extraneous given that tenantId is implemented as an optional prop.

Aside, note that this value is tenant rather than tenantId in the rest of the stripes codebase and in stripes.config.js. Is it really named tenantId in the jobLogData responses? If so, that is exceptionally exceptionally unfortunate. From the stripes point of view, I'd say we should call it tenant in the hook and rename it to tenant when passing it into all those use...Query() hooks, but that introduces inconsistency with the property on those data structures. Where do you think consistency is most important?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think this hook belongs here in DI or could/should we just tweak useOkapiKy in stripes-core to accomodate requests that want to override the tenant value from stripes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @zburke I think adjusting useOkpapiKy in stripes-core would be really nice, because not only DI module overrides headers but also other modules that are implementing ECS stuff (like ui-inventory/ui-consortia-settings). I just didn't want to touch stripes-core because of upcoming releases deadline.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding renaming tenantId to tenant I'll discuss it with BE devs and rename this arg in hooks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created a PR in stripes-core - folio-org/stripes-core#1348

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I brought up tenant vs tenantId with BE folks already and was basically told, "This is already a mess in other places. Changing it here won't actually make the whole system less messy, it'll just make it less messy for you. Since our work is already done and tenantId is a better name anyway, we're not gonna do it again. Sorry not sorry." 😒

Copy link
Contributor Author

@mariia-aloshyna mariia-aloshyna Oct 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, I noticed that mod-search also uses tenantId prop e.g. But I guess we could be at least consistent on UI and use the same naming as it is in stripes.config

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

84.2% 84.2% Coverage
0.0% 0.0% Duplication

@mariia-aloshyna mariia-aloshyna merged commit 8149ece into master Oct 12, 2023
5 checks passed
@mariia-aloshyna mariia-aloshyna deleted the UIDATIMP-1540 branch October 12, 2023 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants